home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* Send msg command *)
- (* *)
- (* Copyright 1988, 1989, 1990, 1991, 1992 by H. Roy Engehausen. All *)
- (* rights reserved. *)
- (* *)
- (*===========================================================================*)
-
- {$O+}
-
- UNIT BBSMC;
-
- INTERFACE
-
- PROCEDURE send_msg_cmd(cmd_string : STRING);
-
- IMPLEMENTATION
-
- USES
- bbauth,
- bbbid,
- bbcmsg,
- bbdummy,
- bbfin,
- bblog,
- bbmdata,
- bbmem,
- bbmess,
- bbmf,
- bbmisc2,
- bbrdata,
- bbrunerr,
- bbsdata,
- bbsess,
- bbsto,
- bbstr;
-
- (*===========================================================================*)
- (* Send msg command *)
- (* Entered when 'S' received by command processor *)
- (*===========================================================================*)
-
- PROCEDURE send_msg_cmd(cmd_string : STRING);
-
- VAR
- abbs : BOOLEAN;
- b : BOOLEAN;
- i : WORD;
- l : BOOLEAN;
- m_t : CHAR;
- p : str_ptr;
- r_sw : BOOLEAN;
- t : tcb_ptr;
- this_act : action_msg_ptr;
- t_str : STRING;
-
- LABEL
- do_reject,
- no_reject;
-
- (*=========================================================================*)
- (* Subroutine -- Send a reply *)
- (*=========================================================================*)
-
- PROCEDURE send_reply;
-
- VAR
- code : INTEGER;
- m : msg_index_ptr;
- n : LONGINT;
-
- (*=======================================================================*)
- (* Subroutine to do compare. Written as a subroutine to save stack space*)
- (*=======================================================================*)
-
- FUNCTION check_reply_subj : BOOLEAN;
- VAR
- s1 : STRING[30];
- s2 : STRING[30];
- BEGIN;
- s1 := t_str;
- upcase_str_var(s1);
- s2 := cmd_string;
- upcase_str_var(s2);
- check_reply_subj := substr_compare(s2, 1, s1);
- END;
-
- (*=======================================================================*)
- (* Main line of send reply *)
- (*=======================================================================*)
-
- BEGIN;
-
- IF words(cmd_string) > 2 THEN
- BEGIN;
- send_message(message_err_wrd);
- active_tcb^.error_sw := TRUE;
- EXIT;
- END;
-
- (*---------------------------------------------------------------------*)
- (* Get message number and convert *)
- (*---------------------------------------------------------------------*)
-
- cmd_string := subword(@cmd_string, 2, 1);
-
- VAL(cmd_string, n, code);
-
- IF (code <> 0) OR (n < 1) OR (n > 65535) THEN
- BEGIN;
- send_message(message_err_ivm);
- active_tcb^.error_sw := TRUE;
- EXIT;
- END;
-
- (*---------------------------------------------------------------------*)
- (* Locate message *)
- (*---------------------------------------------------------------------*)
-
- m := find_msg(n);
-
- IF m = NIL THEN
- BEGIN;
- send_message(message_rmc_nf);
- active_tcb^.error_sw := TRUE;
- EXIT;
- END;
-
- (*---------------------------------------------------------------------*)
- (* Compute subject *)
- (*---------------------------------------------------------------------*)
-
- cmd_string := m^.msg_i_mb.msg_subj;
- IF cmd_string = '' THEN
- cmd_string := ' '
- ELSE
- BEGIN;
- t_str := get_message(message_reply_prefix);
- IF NOT check_reply_subj THEN
- cmd_string := t_str + ' ' + cmd_string;
- END;
-
- (*---------------------------------------------------------------------*)
- (* Put the subject on the memory stack *)
- (*---------------------------------------------------------------------*)
-
- p := get_task_mem('SUB', LENGTH(cmd_string) + 1);
-
- MOVE(cmd_string, p^, LENGTH(cmd_string) + 1);
-
- (*---------------------------------------------------------------------*)
- (* Fake a send command *)
- (*---------------------------------------------------------------------*)
-
- cmd_string := 'S' + mt_private + ' ' + m^.msg_i_mb.msg_from
- + ' @ ' + m^.msg_i_mb.msg_from_at;
-
- IF m^.msg_i_mb.msg_from_h <> '' THEN
- cmd_string := cmd_string + '.' + m^.msg_i_mb.msg_from_h;
-
- (*---------------------------------------------------------------------*)
- (* Tell user about the fake *)
- (*---------------------------------------------------------------------*)
-
- send_tnc_data_str(cmd_string + cr);
-
- END;
-
- (*=========================================================================*)
- (* Function to see if message type is valid. If not, return the prompt *)
- (* message number. A prompt number of 1 means don't give prompt but an *)
- (* error. A prompt number of 0 means type is ok. *)
- (*=========================================================================*)
-
- FUNCTION check_type(type_char : CHAR) : WORD;
-
- BEGIN;
-
- (*---------------------------------------------------------------------*)
- (* Assume everything is ok *)
- (*---------------------------------------------------------------------*)
-
- check_type := 0;
-
- (*---------------------------------------------------------------------*)
- (* SYSOPs are allowed anything but ? *)
- (*---------------------------------------------------------------------*)
-
- IF (active_tcb^.uid_data.user_class >= user_c_rsu)
- AND (type_char <> '?') THEN
- EXIT;
-
- (*---------------------------------------------------------------------*)
- (* Emergency NTS mode? *)
- (*---------------------------------------------------------------------*)
-
- IF opt_block.operate_mode.mode_acc_nonts
- AND active_port^.port_operate_mode.mode_acc_nonts
- AND (type_char = mt_nts) THEN
- BEGIN;
- check_type := message_not_accept_nts;
- EXIT;
- END;
-
- (*---------------------------------------------------------------------*)
- (* Emergency list in use? *)
- (*---------------------------------------------------------------------*)
-
- IF opt_block.operate_mode.mode_acc_emer
- AND active_port^.port_operate_mode.mode_acc_emer
- AND (POS(type_char, opt_block.emer_types) = 0) THEN
- BEGIN;
- check_type := message_smc_type_emer;
- EXIT;
- END;
-
- (*---------------------------------------------------------------------*)
- (* From here we are in normal mode so assume ok *)
- (*---------------------------------------------------------------------*)
-
- check_type := 0;
-
- (*---------------------------------------------------------------------*)
- (* If we have a '?' here, don't tolerate it *)
- (*---------------------------------------------------------------------*)
-
- IF type_char = '?' THEN
- check_type := message_smc_type;
-
- (*---------------------------------------------------------------------*)
- (* If we reach here then BBS checking is done *)
- (*---------------------------------------------------------------------*)
-
- IF active_tcb^.uid_data.user_class >= user_c_bu THEN
- EXIT;
-
- (*---------------------------------------------------------------------*)
- (* Normal mode, normal user. If type not valid then give error *)
- (* Skip EXIT to save space since we fall out anyway *)
- (*---------------------------------------------------------------------*)
-
- IF POS(type_char, opt_block.opt_types) = 0 THEN
- check_type := message_smc_type;
-
- (*---------------------------------------------------------------------*)
- (* Exit *)
- (*---------------------------------------------------------------------*)
-
- END;
-
- (*=========================================================================*)
- (* Subroutine -- Find a reject/deny action *)
- (*=========================================================================*)
-
- FUNCTION look_for_reject_deny : BOOLEAN;
- BEGIN;
-
- (*---------------------------------------------------------------------*)
- (* Look for reject by checking the action chain *)
- (*---------------------------------------------------------------------*)
-
- this_act := NIL;
-
- (*---------------------------------------------------------------------*)
- (* Loop down the chain look for a reject action *)
- (*---------------------------------------------------------------------*)
-
- REPEAT
-
- (*-------------------------------------------------------------------*)
- (* Get tne next action from the chain *)
- (*-------------------------------------------------------------------*)
-
- msg_action_check(@active_tcb^.curr_msg, this_act);
-
- (*-------------------------------------------------------------------*)
- (* If we have searched the whole chain then we didn't find anything *)
- (*-------------------------------------------------------------------*)
-
- IF this_act = NIL THEN
- BEGIN;
- look_for_reject_deny := FALSE;
- EXIT;
- END;
-
- UNTIL (this_act^.action_type
- AND (action_msg_reject OR action_msg_deny)) <> 0;
-
- (*---------------------------------------------------------------------*)
- (* Set result based on invert switch *)
- (*---------------------------------------------------------------------*)
-
- look_for_reject_deny :=
- (this_act^.action_type AND action_msg_invert) = 0;
-
- END;
-
- (*=========================================================================*)
- (* Get reject message number *)
- (*=========================================================================*)
-
- FUNCTION get_reject_message : WORD;
-
- VAR
- i : BYTE;
- w_ptr : ^WORD;
-
- BEGIN;
-
- IF ((this_act^.action_type AND action_msg_deny) = 0)
- OR (active_tcb^.uid_data.user_class = user_c_bu) THEN
- get_reject_message := message_rejected
- ELSE
- BEGIN;
- i := LENGTH(this_act^.action_info);
- w_ptr := ADDR(this_act^.action_info[i + 1]);
- get_reject_message := message_rejected + w_ptr^;
- END
-
- END;
-
- (*=========================================================================*)
- (* Autheticate send command *)
- (*=========================================================================*)
-
- PROCEDURE auth_send;
-
- VAR
- work_1 : STRING;
-
- BEGIN;
-
- user_auth(work_1);
-
- END;
-
- (*=========================================================================*)
- (* Main line of send_msg_cmd *)
- (*=========================================================================*)
-
- BEGIN;
-
- upcase_str_var(cmd_string);
-
- (*-----------------------------------------------------------------------*)
- (* Authenticate send *)
- (*-----------------------------------------------------------------------*)
-
- IF ((active_tcb^.tcb_access_mode.access_flags AND access_f_user) <> 0)
- AND NOT active_tcb^.tcb_access_ok
- AND (cmd_string <> 'S~') THEN
- BEGIN;
-
- send_message(message_bad_access_send);
-
- auth_send;
-
- IF active_tcb^.error_sw THEN
- BEGIN;
- send_message(message_send_auth_fail);
- EXIT;
- END;
-
- active_tcb^.tcb_access_ok := TRUE;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Check for SR *)
- (*-----------------------------------------------------------------------*)
-
- IF cmd_string[2] <> 'R' THEN
- r_sw := FALSE
- ELSE
- BEGIN;
-
- r_sw := TRUE;
-
- (*-------------------------------------------------------------------*)
- (* If user did not supply a number, ask for one *)
- (*-------------------------------------------------------------------*)
-
- IF words(cmd_string) = 1 THEN
- BEGIN;
- send_message(message_what_reply);
- cmd_string := read_tnc_data_str;
- strip_crlf(cmd_string);
- IF cmd_string = '' THEN
- BEGIN;
- send_message(message_nodata_can);
- EXIT;
- END;
- cmd_string := 'SR ' + cmd_string;
- END;
-
- (*-------------------------------------------------------------------*)
- (* Process the reply *)
- (*-------------------------------------------------------------------*)
-
- send_reply;
-
- (*-------------------------------------------------------------------*)
- (* If error then quit *)
- (*-------------------------------------------------------------------*)
-
- IF active_tcb^.error_sw THEN
- EXIT;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Handle special case of message to SYSOP *)
- (*-----------------------------------------------------------------------*)
-
- IF cmd_string = 'S~' THEN
- BEGIN;
-
- (*-------------------------------------------------------------------*)
- (* Put the subject on the memory stack *)
- (*-------------------------------------------------------------------*)
-
- cmd_string := 'SYSOP Message';
-
- p := get_task_mem('SUB', LENGTH(cmd_string) + 1);
-
- MOVE(cmd_string, p^, LENGTH(cmd_string) + 1);
-
- (*-------------------------------------------------------------------*)
- (* Fake an SP SYSOP command *)
- (*-------------------------------------------------------------------*)
-
- cmd_string := 'SP SYSOP';
- r_sw := TRUE;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Initialize *)
- (*-----------------------------------------------------------------------*)
-
- FILLCHAR(active_tcb^.curr_msg, SIZEOF(msg_index_block), CHR(0));
-
- abbs := active_tcb^.tcb_abbs;
-
- (*-----------------------------------------------------------------------*)
- (* Set the msg type and flag *)
- (*-----------------------------------------------------------------------*)
-
- m_t := active_tcb^.curr_msg.msg_i_mb.msg_type;
-
- IF LENGTH(cmd_string) > 1 THEN
- m_t := cmd_string[2]
- ELSE
- m_t := '?';
-
- active_tcb^.curr_msg.msg_i_mb.msg_flag := 0;
-
- (*-----------------------------------------------------------------------*)
- (* Convert blank as needed *)
- (*-----------------------------------------------------------------------*)
-
- IF opt_block.opt_blank_to_p AND (m_t = ' ') THEN
- m_t := mt_private;
-
- IF opt_block.opt_blank_to_p AND (m_t = ' ') THEN
- m_t := mt_private;
-
- (*-----------------------------------------------------------------------*)
- (* Check message type *)
- (*-----------------------------------------------------------------------*)
-
- i := check_type(m_t);
-
- (*-----------------------------------------------------------------------*)
- (* Handle the case of something is wrong and this is a BBS *)
- (*-----------------------------------------------------------------------*)
-
- IF (i <> 0) AND ((active_tcb^.uid_data.user_flag AND user_f_bbs) <> 0) THEN
- BEGIN;
-
- IF abbs AND (active_tcb^.tcb_bid_level > 1) THEN
- send_tnc_data_str('LATER' + cr)
- ELSE
- BEGIN;
- send_message(message_smc_type_bad);
- active_tcb^.error_sw := TRUE;
- END;
-
- EXIT;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Prompt non-BBS guys for correct type if it was wrong. If this is *)
- (* a BBS then we can't have gotten here with a bad type *)
- (*-----------------------------------------------------------------------*)
-
- WHILE (i <> 0) DO
- BEGIN;
-
- send_message(i);
-
- t_str := read_tnc_data_str;
-
- strip_crlf(t_str);
- IF t_str = '' THEN
- BEGIN;
- send_message(message_nodata_can);
- EXIT;
- END;
-
- IF LENGTH(t_str) <> 1 THEN
- m_t := #0
- ELSE
- BEGIN;
- m_t := UPCASE(t_str[1]);
- i := check_type(m_t);
- END;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Save the type *)
- (*-----------------------------------------------------------------------*)
-
- active_tcb^.curr_msg.msg_i_mb.msg_type := m_t;
-
- (*-----------------------------------------------------------------------*)
- (* Process 'TO' data if present. If not get some and process it *)
- (*-----------------------------------------------------------------------*)
-
- IF words(cmd_string) > 1 THEN
- send_msg_to_process(subword(@cmd_string, 2, 0))
- ELSE
- BEGIN;
- send_message(message_smc_to);
-
- t_str := read_tnc_data_str;
- strip_crlf(t_str);
- IF t_str = '' THEN EXIT;
-
- send_msg_to_process(t_str);
- END;
-
- IF active_tcb^.error_sw THEN
- EXIT;
-
- (*-----------------------------------------------------------------------*)
- (* Now processing a message *)
- (*-----------------------------------------------------------------------*)
-
- active_tcb^.tcb_rcv_msg := TRUE;
-
- (*-----------------------------------------------------------------------*)
- (* Test the BID if necessary *)
- (* b indicates result of BID test *)
- (* l says that a test was done *)
- (*-----------------------------------------------------------------------*)
-
- IF ((LENGTH(active_tcb^.curr_msg.msg_i_mb.msg_bid) = 1)
- AND (active_tcb^.curr_msg.msg_i_mb.msg_bid[1] = CHR(0)))
- OR (LENGTH(active_tcb^.curr_msg.msg_i_mb.msg_bid) = 0) THEN
- BEGIN;
- b := FALSE;
- l := FALSE;
- END
- ELSE
- BEGIN;
- b := bid_check;
- l := TRUE;
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Bid failure? *)
- (*-----------------------------------------------------------------------*)
-
- IF b AND abbs THEN
- BEGIN;
- send_tnc_data_str('NO' + cr);
- EXIT;
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Execute a reject/deny action if there is one *)
- (*-----------------------------------------------------------------------*)
-
- IF look_for_reject_deny THEN
- BEGIN;
-
- (*-------------------------------------------------------------------*)
- (* *)
- (* NOTE: If the deny bit is set then we only do case 1. Messages *)
- (* originating at another BBS are allowed *)
- (* *)
- (* Case Action *)
- (* ---- ------ *)
- (* 1 Non BBS -- Send reject message and quit command *)
- (* BBS with no SID -- Take action based on reject action code *)
- (* 2 0 -- No reject action. Use hold *)
- (* 3 1 -- Same as zero *)
- (* 4 2 -- Send reject and disconnect *)
- (* BBS with just $ -- Take action based on reject action code *)
- (* 5 0 -- No reject action. Use hold *)
- (* 6 1 -- Send NO; send reject; quit *)
- (* 7 2 -- Send reject and disconnect *)
- (* 8 BBS with R$ -- Send Reject message and quit command *)
- (* *)
- (* i is set with the proper bits to signal action to be done *)
- (* 1 = send no *)
- (* 2 = send reject *)
- (* 4 = disconnect *)
- (* 8 = quit command *)
- (*-------------------------------------------------------------------*)
-
- (*-------------------------------------------------------------------*)
- (* Handle DENY and a BBS. If this case is true then no action is *)
- (* warranted. If this case is not true then fall thru. Case 1 *)
- (* will be executed because this code filters all other cases *)
- (*-------------------------------------------------------------------*)
-
- IF ((this_act^.action_type AND action_msg_deny) <> 0)
- AND (active_tcb^.uid_data.user_class = user_c_bu) THEN
- GOTO no_reject;
-
- (*-------------------------------------------------------------------*)
- (* Detect non-BBS and BBS with R$ (case 1 and 8) *)
- (*-------------------------------------------------------------------*)
-
- IF (active_tcb^.uid_data.user_class <> user_c_bu)
- OR (abbs AND (active_tcb^.tcb_bid_level > 1)) THEN
- BEGIN;
- i := 2 + 8;
- GOTO do_reject;
- END;
-
- (*-------------------------------------------------------------------*)
- (* Detect case 4 and 7 -- Reject and disconnect *)
- (*-------------------------------------------------------------------*)
-
- IF active_port^.reject_act = 2 THEN
- BEGIN;
- i := 2 + 4;
- GOTO do_reject;
- END;
-
- (*-------------------------------------------------------------------*)
- (* Detect case 6 *)
- (*-------------------------------------------------------------------*)
-
- IF abbs AND (active_port^.reject_act = 1) THEN
- BEGIN;
- i := 1 + 2 + 8;
- GOTO do_reject;
- END;
-
- (*-------------------------------------------------------------------*)
- (* Everything left is no action at all (Cases 2, 3, and 5) *)
- (*-------------------------------------------------------------------*)
-
- GOTO no_reject;
-
- (*-------------------------------------------------------------------*)
- (* Execute the actual actions *)
- (*-------------------------------------------------------------------*)
-
- do_reject:
-
- IF (i AND 1) > 0 THEN
- send_tnc_data_str('NO' + cr);
-
- IF (i AND 2) > 0 THEN
- send_message(get_reject_message);
-
- IF (i AND 4) > 0 THEN
- BEGIN;
- send_message(message_op_halted);
- end_session(TRUE);
- END;
-
- IF (i AND 8) > 0 THEN
- EXIT;
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* End of reject code *)
- (*-----------------------------------------------------------------------*)
-
- no_reject:
-
- (*-----------------------------------------------------------------------*)
- (* Tell about the BID in various means *)
- (*-----------------------------------------------------------------------*)
-
- IF abbs THEN
- BEGIN;
-
- (*-------------------------------------------------------------------*)
- (* This is for an Advanced BBS. Tell NO on bid as needed *)
- (*-------------------------------------------------------------------*)
-
- IF b THEN
- BEGIN;
- send_tnc_data_str('NO' + cr);
- EXIT;
- END;
-
- (*-------------------------------------------------------------------*)
- (* If this BBS has "LATER" support, see if we need to send LATER *)
- (*-------------------------------------------------------------------*)
-
- IF (active_tcb^.tcb_bid_level > 1) AND l THEN
- BEGIN;
- t := ring_tcb;
- REPEAT
-
- IF t^.tcb_rcv_msg
- AND (t <> active_tcb)
- AND (active_tcb^.curr_msg.msg_i_mb.msg_bid =
- t^.curr_msg.msg_i_mb.msg_bid) THEN
- BEGIN;
- send_tnc_data_str('LATER' + cr);
- EXIT;
- END;
- t := t^.next_tcb;
-
- UNTIL t = ring_tcb;
- END;
-
- (*-------------------------------------------------------------------*)
- (* If we get here then we want the message *)
- (*-------------------------------------------------------------------*)
-
- send_tnc_data_str('OK' + cr);
-
- END
- ELSE
-
- (*-------------------------------------------------------------------*)
- (* This is for a user or old BBS. Just warn *)
- (*-------------------------------------------------------------------*)
-
- IF b THEN
- send_message(message_dupe_bid);
-
- (*-----------------------------------------------------------------------*)
- (* Get a subject *)
- (*-----------------------------------------------------------------------*)
-
- IF NOT r_sw THEN
- BEGIN;
-
- (*-------------------------------------------------------------------*)
- (* This fetches the subject from anything but a reply. In certain *)
- (* circumstances we are going to loop prompting the user for a subj *)
- (*-------------------------------------------------------------------*)
-
- b := TRUE;
-
- REPEAT;
-
- (*-----------------------------------------------------------------*)
- (* For a non-Advanced BBS, issue the subject prompt *)
- (*-----------------------------------------------------------------*)
-
- IF NOT abbs THEN
- send_message(message_smc_subj);
-
- (*-----------------------------------------------------------------*)
- (* Read the subject and tuck it away *)
- (*-----------------------------------------------------------------*)
-
- t_str := read_tnc_data_str;
-
- strip_crlf(t_str);
- active_tcb^.curr_msg.msg_i_mb.msg_subj := t_str;
-
- (*-----------------------------------------------------------------*)
- (* Unless private, blank subjects are not allowed from users *)
- (*-----------------------------------------------------------------*)
-
- IF (t_str = '')
- AND (active_tcb^.uid_data.user_class <> user_c_bu)
- AND (active_tcb^.curr_msg.msg_i_mb.msg_type <> mt_private) THEN
- BEGIN;
- IF NOT b THEN
- BEGIN;
- send_message(message_nodata_can);
- EXIT;
- END;
- send_message(message_nosubj);
- b := FALSE
- END
- ELSE
- b := TRUE;
-
- UNTIL b; (*----- Subject prompting loop -----------------------------*)
-
- (*-------------------------------------------------------------------*)
- (* If this is not a BBS then we will make a second pass over the *)
- (* reject/deny actions *)
- (*-------------------------------------------------------------------*)
-
- IF active_tcb^.uid_data.user_class <> user_c_bu THEN
- BEGIN;
-
- (*---------------------------------------------------------------*)
- (* See if an action exists. If so, do the reject *)
- (*---------------------------------------------------------------*)
-
- IF look_for_reject_deny THEN
- BEGIN;
- send_message(get_reject_message);
- EXIT;
- END;
-
- END;
-
- END (*----- End subject processing for non-reply ----------------------*)
- ELSE
- BEGIN;
-
- (*-------------------------------------------------------------------*)
- (* This fetches the prestored REPLY subject for an SR command *)
- (*-------------------------------------------------------------------*)
-
- p := find_task_mem_addr('SUB');
- IF p = NIL THEN
- RUNERROR(nil_subj);
- MOVE(p^, active_tcb^.curr_msg.msg_i_mb.msg_subj, LENGTH(p^) + 1);
- free_task_mem('SUB', TRUE);
-
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Get text *)
- (*-----------------------------------------------------------------------*)
-
- IF NOT abbs THEN
- send_message(message_smc_text);
-
- t_str := opt_block.msg_file_dir + active_tcb^.port_chan_s + '.IN';
- in_text_file(t_str, TRUE);
-
- IF active_tcb^.error_sw = TRUE THEN
- EXIT;
-
- (*-----------------------------------------------------------------------*)
- (* Set the date/time of origination to when it finished! *)
- (*-----------------------------------------------------------------------*)
-
- active_tcb^.curr_msg.msg_i_mb.msg_dt_in := current_day_time;
-
- (*-----------------------------------------------------------------------*)
- (* Set the size *)
- (*-----------------------------------------------------------------------*)
-
- active_tcb^.curr_msg.msg_i_mb.msg_size := io_file_size;
-
- (*-----------------------------------------------------------------------*)
- (* Add message to list *)
- (*-----------------------------------------------------------------------*)
-
- add_msg(t_str, FALSE);
-
- (*-----------------------------------------------------------------------*)
- (* Process CC as needed *)
- (*-----------------------------------------------------------------------*)
-
- make_cc;
-
- (*-----------------------------------------------------------------------*)
- (* Log it *)
- (*-----------------------------------------------------------------------*)
-
- log_data_is(active_tcb^.curr_msg.msg_i_mb.msg_number, cmd_string);
-
- (*-----------------------------------------------------------------------*)
- (* Tell user *)
- (*-----------------------------------------------------------------------*)
-
- IF NOT abbs THEN
- send_message(message_added_msg);
-
- END;
-
- END.